<meta charset="utf-8">
<div class="user-layout-north">
	<div class="north-menu">
		<ul>
			<div class="button-group">
			  <button type="button" class="button" onclick="$showdialogs($(this));" data-toggle="click" data-target="#mydialog" data-mask="1" data-width="50%">添加</button>
			  <button type="button" class="button" disabled="disabled">编辑</button>
			  <button type="button" class="button" disabled="disabled">删除</button>
			  <button type="button" class="button" disabled="disabled">冻结</button>
			  <button type="button" class="button" disabled="disabled">解冻</button>
			</div>
		</ul>
	</div>
</div>
<div class="user-layout-center">
	<div class="easyui-panel" id="auto_panel" data-options="height:'100%',border:false">
		<table id="user-lists"></table>
	</div>
</div>

<script type="text/javascript">

	$(function(){
		
		init_pintuer();//初始化pintuer参数
		
		$("#user-lists").datagrid({
			fitColumns:true,
			fit:true,
			pagination:true,
			url:'model/rbac/user/list.json',
			method:'get',
			singleSelect:true,
			rowStyler:function(index,row){
				return 'height:30px;';
			},
			columns:[[
				{field:'id',title:'编号',hidden:true},
				{field:'userName',title:'<font style="font-weight:700;line-height:30px;">用户名</font>',width:100},
				{
						field:'department',
						title:'<font style="font-weight:700">部门</font>',
						formatter:function(val,row){
							if(val){
								return val.departmentName;
							}
						},
						width:100
				},
				{field:'createTime',title:'<font style="font-weight:700">创建时间</font>',formatter:function(val,row){
					return new Date(val).toLocaleDateString();
				},width:100},
				{field:'status',title:'<font style="font-weight:700">状态</font>',formatter:function(val,row){
					if(val=='CONGEAL'){
						return '冻结';
					}else if(val=='NORMAL'){
						return '正常';
					}
				},width:100}
			]]
		});
		
	});
</script>

<style type="text/css">
	.north-menu{
		margin:10px 10px 0 10px;
	}
	.north-menu span{
		margin-right: 4px;
	}
	
	.user-layout-center{position:absolute;left:0;}
	.user-layout-center{top:60px;bottom:10px;_height:100%;overflow:auto;}
	.user-layout-center{_position:relative;background:white;left:10px;right:10px;_top:0;_left:0;_margin-left:10px;}
	
</style>